<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Rag Hu
 * Created Time: 2019/7/9 14:05
 * Modified Time: 2019/7/9 14:05
 * Version: 2.0
 */

namespace App\Modules\System\Repositories;


use App\Models\DictionaryItem;
use Flower\Core\Repository\Eloquent\BaseRepository;

class DictionaryItemRepository extends BaseRepository
{
    public function model()
    {
        return DictionaryItem::class;
    }

    public function getActivityPlaybill()
    {
        return $this->model
            ->select([
                'picture.id',
                'dictionary_item.fullname as name',
                'picture.image'
            ])
            ->leftJoin('picture', 'dictionary_item.resource', 'picture.id')
            ->where('dictionary_item.parent_id', 6)->get();
    }

    public function getServiceTypeImg()
    {
        return $this->model
            ->select('dictionary_item.id','image')
            ->where('parent_id',4)
            ->leftJoin('picture','dictionary_item.resource','picture.id')
            ->get();


    }

}